package day16_Runnable.作业.作业2;
//打印字母线程
public class LetterPrinter extends Thread{
    private Printer p;
    public LetterPrinter(Printer p){
        this.p=p;
    }
    public void run()  {
        for (char c = 'A'; c <='Z' ; c++) {
            try {
                p.print(c);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
